package com.cht.commonUtil.delivery;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cht.commonUtil.structure.S4;
import com.cht.commonUtil.webInit.SP;
import com.google.gson.Gson;

public class GetParameter4SDEL extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request,response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		response.setCharacterEncoding( SP.UIcodeSet );
		response.setContentType("application/json");
		
		S4 s4 = new S4();
		s4.setS1( SP.APsvnIP );
		s4.setS2( SP.APsvnId );
		s4.setS3( SP.APsvnPwd );
		s4.setS4( SP.APsvnPath );
		
		response.getWriter().write( new Gson().toJson(s4) );
	}

}
